<?php
$oCnd = new Cnd_Model();
?>


<div class="row2" >


    <table width="100%"  class="table table-bordered table-hover" border="1px" cellspacing="0" cellpadding="0">

        <thead>

        <tr>
            <td bgcolor="#f0f0f0" style="border-bottom: 0px;" rowspan="2"><center>CERTIDÃO FEDERAL</center></td>
            <td  bgcolor="#f0f0f0" style="border-bottom: 0px"><center>Total</center></td>
            <td bgcolor="#f0f0f0" style="border-bottom: 0px"><center>Em Dia</center></td>
            <td  bgcolor="#f0f0f0" style="border-bottom: 0px"><center>Vencidas</center></td>
            <td  bgcolor="#f0f0f0" style="border-bottom: 0px"><center>Sem Pendências</center></td>
            <td  bgcolor="#f0f0f0" style="border-bottom: 0px"><center>Com Pendências</center></td>
            <td  bgcolor="#f0f0f0" colspan="4" style="border-bottom: 0px"><center>Certidões à vencer em dias</center></td>
            <td  bgcolor="#f0f0f0" colspan="2"><center>Indicador de Desempenho</center></td>
        </tr>
        </thead>

        <tr>
            <td bgcolor="#f0f0f0" style="font-weight:bold; border-left: 0px; border-top: 0px; "><b></b></td>
            <td bgcolor="#f0f0f0" style="font-weight:bold; border-left: 0px; border-top: 0px; "><center></center></td>
            <td bgcolor="#f0f0f0" style="font-weight:bold; border-left: 0px; border-top: 0px; "><center></center></td>
            <td bgcolor="#f0f0f0" style="font-weight:bold; border-left: 0px; border-top: 0px; "><center></center></td>
            <td bgcolor="#f0f0f0" style="font-weight:bold; border-left: 0px; border-top: 0px; "><center></center></td>
            <td bgcolor="#f0f0f0" style="font-weight:bold; border-left: 0px; border-top: 0px; "><center></center></td>
            <td bgcolor="#f0f0f0" style="width: 60px;" ><center><b>10</b></center></td>
            <td bgcolor="#f0f0f0" style="width: 60px;"><center><b>20</b></center></td>
            <td bgcolor="#f0f0f0" style="width: 60px;"><center><b>30</b></center></td>
            <td bgcolor="#f0f0f0" style="width: 60px;"><center><b>>30</b></center></td>
            <td bgcolor="#f0f0f0"><center><b>Sem Pendências</b></center></td>
            <td bgcolor="#f0f0f0"><center><b>Pendentes</b></center></td>
        </tr>  
        <tr>
            <td>RFB | PGFN | INSS - Prazo 180 dias</td>
            <td><center><?php echo $totalRfb = $oCnd->qtdTodosTipo(1)->total ?></center></td>
            <td><center><?php echo $DiaRfb = $oCnd->qtdTodosTipoEmDia(1)->total ?></center></td>
            <td><center><?php echo $VencidaRfb = $oCnd->qtdTodosTipoVencida(1)->total ?></center></td>
            <td><center><?php echo $SemPendenciasRfb = $oCnd->qtdTodosTipoSemPendencia(1)->total ?></center></td>
            <td><center><?php echo $ComPendenciasRfb = $oCnd->qtdTodosTipoComPendencia(1)->total ?></center></td>
        
        <td><center><?php echo $Com10diasRfb = $oCnd->qtdTodosVencerTipoDia(1, 10)->total ?></center></td>
        <td><center><?php echo $Com20diasRfb = $oCnd->qtdTodosVencerTipoDia(1, 20)->total ?></center></td>
        <td><center><?php echo $Com30diasRfb = $oCnd->qtdTodosVencerTipoDia(1, 30)->total ?></center></td>
        <td><center><?php echo $ComMaisdiasRfb = $oCnd->qtdTodosVencerTipoDia(1, 'D')->total ?></center></td>
    
        <td><center><?php echo $oCnd->porcentagem($SemPendenciasRfb, $SemPendenciasRfb + $ComPendenciasRfb); ?></center></td>
        <td><center><?php echo $oCnd->porcentagem($ComPendenciasRfb, $SemPendenciasRfb + $ComPendenciasRfb); ?></center></td>
        </tr>  



        <tr>
            <td>CRF | FGTS - Prazo 30 dias</td>
            <td><center><?php echo $totalCrf = $oCnd->qtdTodosTipo(2)->total ?></center></td>
        <td><center><?php echo $DiaCrf = $oCnd->qtdTodosTipoEmDia(2)->total ?></center></td>
        <td><center><?php echo $VencidaCrf = $oCnd->qtdTodosTipoVencida(2)->total ?></center></td>
        <td><center><?php echo $SemPendenciasCrf = $oCnd->qtdTodosTipoSemPendencia(2)->total ?></center></td>
        <td><center><?php echo $ComPendenciasCrf = $oCnd->qtdTodosTipoComPendencia(2)->total ?></center></td>
        
    
        <td><center><?php echo $Com10diasCrf = $oCnd->qtdTodosVencerTipoDia(2, 10)->total ?></center></td>
        <td><center><?php echo $Com20diasCrf = $oCnd->qtdTodosVencerTipoDia(2, 20)->total ?></center></td>
        <td><center><?php echo $Com30diasCrf = $oCnd->qtdTodosVencerTipoDia(2, 30)->total ?></center></td>
        <td><center><?php echo $ComMaisdiasCrf = $oCnd->qtdTodosVencerTipoDia(2, 'D')->total ?></center></td>

        <td><center><?php echo $oCnd->porcentagem($SemPendenciasCrf, $SemPendenciasCrf + $ComPendenciasCrf); ?></center></td>
        <td><center><?php echo $oCnd->porcentagem($ComPendenciasCrf, $SemPendenciasCrf + $ComPendenciasCrf); ?></center></td>


        </tr> 


        <tr style="font-weight:bold;" >
            <td align=center>SUB-TOTAL FEDERAL</td>
            <td><center><?php echo $subtotalFederalGeral = $totalCrf + $totalRfb ?></center></td>
        <td><center><?php echo $subtotalEmDiaFederal = $DiaRfb + $DiaCrf ?></center></td>
        <td><center><?php echo $subtotalVencidaFederal = $VencidaRfb + $VencidaCrf ?></center></td>
        <td><center><?php echo $totalSemPendencia = $SemPendenciasRfb + $SemPendenciasCrf ?></center></td>
        <td><center><?php echo $totalComPendencia = $ComPendenciasCrf + $ComPendenciasRfb ?></center></td>



        <td><center><?php echo $Subtotal10DiasFederal = $Com10diasRfb + $Com10diasCrf ?></center></td>
        <td><center><?php echo $Subtotal20DiasFederal = $Com20diasRfb + $Com20diasCrf ?></center></td>
        <td><center><?php echo $Subtotal30DiasFederal = $Com30diasRfb + $Com30diasCrf ?></center></td>
        <td><center><?php echo $SubtotalMais30DiasFederal = $ComMaisdiasRfb + $ComMaisdiasCrf ?></center></td>



        <td><center><?php echo $PorcentagemTotalSemPendenciaFederal = $oCnd->porcentagem($totalSemPendencia, $totalSemPendencia + $totalComPendencia); ?></center></td>
        <td><center><?php echo $PorcentagemTotalCemPendenciaFederal = $oCnd->porcentagem($totalComPendencia, $totalSemPendencia + $totalComPendencia); ?></center></td>

        </tr>  


        <tr>
            <td colspan="12">
                &nbsp;
            </td>
        </tr>

        <tr style="font-weight:bold;" >
        <td bgcolor="#f0f0f0" style="border-bottom: 0px"><center>CERTIDÃO ESTADUAL</center></td>
        <td  bgcolor="#f0f0f0" style="border-bottom: 0px"><center>Total</center></td>
        <td bgcolor="#f0f0f0" style="border-bottom: 0px"><center>Em Dia</center></td>
        <td  bgcolor="#f0f0f0" style="border-bottom: 0px"><center>Vencidas</center></td>
        <td  bgcolor="#f0f0f0" style="border-bottom: 0px"><center>Sem Pendências</center></td>
        <td  bgcolor="#f0f0f0" style="border-bottom: 0px"><center>Com Pendências</center></td>
        <td  bgcolor="#f0f0f0" colspan="4" style="border-bottom: 0px"><center>Certidões à vencer em dias</center></td>
        <td  bgcolor="#f0f0f0" colspan="2"><center>Indicador de Desempenho</center></td>
        </tr>
        </thead>

        <tr  >
        <td bgcolor="#f0f0f0" style="font-weight:bold; border-left: 0px; border-top: 0px; "><b></b></td>
        <td bgcolor="#f0f0f0" style="font-weight:bold; border-left: 0px; border-top: 0px; "><center></center></td>
        <td bgcolor="#f0f0f0" style="font-weight:bold; border-left: 0px; border-top: 0px; "><center></center></td>
        <td bgcolor="#f0f0f0" style="font-weight:bold; border-left: 0px; border-top: 0px; "><center></center></td>
        <td bgcolor="#f0f0f0" style="font-weight:bold; border-left: 0px; border-top: 0px; "><center></center></td>
        <td bgcolor="#f0f0f0" style="font-weight:bold; border-left: 0px; border-top: 0px; "><center></center></td>




        <td bgcolor="#f0f0f0" style="width: 60px;" ><center><b>10</b></center></td>
        <td bgcolor="#f0f0f0" style="width: 60px;"><center><b>20</b></center></td>
        <td bgcolor="#f0f0f0" style="width: 60px;"><center><b>30</b></center></td>
        <td bgcolor="#f0f0f0" style="width: 60px;"><center><b>>30</b></center></td>
        <td bgcolor="#f0f0f0"><center><b>Sem Pendências</b></center></td>
        <td bgcolor="#f0f0f0"><center><b>Pendentes</b></center></td>
        </tr>  



        <tr>
            <td>Estadual - 30 dias</td>
            <td><center><?php echo $totalEstadual30 = $oCnd->qtdTodosAmbitoDias(2,30)->total ?></center></td>
            <td><center><?php echo $DiaEstadual30 = $oCnd->qtdTodosAmbitoDiasEmDia(2,30)->total ?></center></td>
            <td><center><?php echo $VencidaEstadual30 = $oCnd->qtdTodosAmbitoDiasVencida(2,30)->total ?></center></td>
            <td><center><?php echo $SemPendenciasEstadual30 = $oCnd->qtdTodosAmbitoSemPendencia(2,30)->total ?></center></td>
            <td><center><?php echo $ComPendenciasEstadual30 = $oCnd->qtdTodosAmbitoComPendencia(2,30)->total ?></center></td>
            
            <td><center><?php echo $Com10diasEstadual30 = $oCnd->qtdTodosVencerAmbitoDia(2,30,10)->total ?></center></td>
            <td><center><?php echo $Com20diasEstadual30 = $oCnd->qtdTodosVencerAmbitoDia(2,30,20)->total ?></center></td>
            <td><center><?php echo $Com30diasEstadual30 = $oCnd->qtdTodosVencerAmbitoDia(2,30,30)->total ?></center></td>
            <td><center><?php echo $ComMais30diasEstadual30 = $oCnd->qtdTodosVencerAmbitoDia(2,30,'D')->total ?></center></td>
        
    
    
            <td><center><?php echo $porcentagemSemPendenciaEstadual30 =  $oCnd->porcentagem($SemPendenciasEstadual30, $SemPendenciasEstadual30 + $ComPendenciasEstadual30); ?></center></td>
            <td><center><?php echo $porcentagemComPendenciaEstadual30 =  $oCnd->porcentagem($ComPendenciasEstadual30, $SemPendenciasEstadual30 + $ComPendenciasEstadual30); ?></center></td>
    
    
        </tr> 

        <tr>
            <td>Estadual - 60 dias</td>
            <td><center><?php echo $totalEstadual60 = $oCnd->qtdTodosAmbitoDias(2,60)->total ?></center></td>
            <td><center><?php echo $DiaEstadual60 = $oCnd->qtdTodosAmbitoDiasEmDia(2,60)->total ?></center></td>
            <td><center><?php echo $VencidaEstadual60 = $oCnd->qtdTodosAmbitoDiasVencida(2,60)->total ?></center></td>
            <td><center><?php echo $SemPendenciasEstadual60 = $oCnd->qtdTodosAmbitoSemPendencia(2,60)->total ?></center></td>
            <td><center><?php echo $ComPendenciasEstadual60 = $oCnd->qtdTodosAmbitoComPendencia(2,60)->total ?></center></td>
            <td><center><?php echo $Com10diasEstadual60 = $oCnd->qtdTodosVencerAmbitoDia(2,60,10)->total ?></center></td>
            <td><center><?php echo $Com20diasEstadual60 = $oCnd->qtdTodosVencerAmbitoDia(2,60,20)->total ?></center></td>
            <td><center><?php echo $Com30diasEstadual60 = $oCnd->qtdTodosVencerAmbitoDia(2,60,30)->total ?></center></td>
            <td><center><?php echo $ComMais30diasEstadual60 = $oCnd->qtdTodosVencerAmbitoDia(2,60,'D')->total ?></center></td>
        
            <td><center><?php echo $porcentagemSemPendenciaEstadual60 = $oCnd->porcentagem($SemPendenciasEstadual60, $SemPendenciasEstadual60 + $ComPendenciasEstadual60); ?></center></td>
            <td><center><?php echo $porcentagemComPendenciaEstadual60 = $oCnd->porcentagem($ComPendenciasEstadual60, $SemPendenciasEstadual60 + $ComPendenciasEstadual60); ?></center></td>

    
        </tr> 



        <tr>
            <td>Estadual - 180 dias</td>
            <td><center><?php echo $totalEstadual180 = $oCnd->qtdTodosAmbitoDias(2,180)->total ?></center></td>
            <td><center><?php echo $DiaEstadual180 = $oCnd->qtdTodosAmbitoDiasEmDia(2,180)->total ?></center></td>
            <td><center><?php echo $VencidaEstadual180 = $oCnd->qtdTodosAmbitoDiasVencida(2,180)->total ?></center></td>
            <td><center><?php echo $SemPendenciasEstadual180 = $oCnd->qtdTodosAmbitoSemPendencia(2,180)->total ?></center></td>
            <td><center><?php echo $ComPendenciasEstadual180 = $oCnd->qtdTodosAmbitoComPendencia(2,180)->total ?></center></td>
            <td><center><?php echo $Com10diasEstadual180 = $oCnd->qtdTodosVencerAmbitoDia(2,180,10)->total ?></center></td>
            <td><center><?php echo $Com20diasEstadual180 = $oCnd->qtdTodosVencerAmbitoDia(2,180,20)->total ?></center></td>
            <td><center><?php echo $Com30diasEstadual180 = $oCnd->qtdTodosVencerAmbitoDia(2,180,30)->total ?></center></td>
            <td><center><?php echo $ComMais30diasEstadual180 = $oCnd->qtdTodosVencerAmbitoDia(2,180,'D')->total ?></center></td>
        
            <td><center><?php echo $porcentagemSemPendenciaEstadual180 = $oCnd->porcentagem($SemPendenciasEstadual180, $SemPendenciasEstadual180 + $ComPendenciasEstadual180); ?></center></td>
            <td><center><?php echo $porcentagemComPendenciaEstadual180 = $oCnd->porcentagem($ComPendenciasEstadual180, $SemPendenciasEstadual180 + $ComPendenciasEstadual180); ?></center></td>
    
    
        </tr> 


        <tr style="font-weight:bold;" >
            <td align=center>SUB-TOTAL ESTADUAL</td>
            <td><center><?php echo $subtotalEstadualGeral = $totalEstadual30 + $totalEstadual60 + $totalEstadual180 ?></center></td>
        <td><center><?php echo $subtotalEstadualEmDia = $DiaEstadual30 + $DiaEstadual60 + $DiaEstadual180 ?></center></td>
        <td><center><?php echo $subtotalEstadualVencida = $VencidaEstadual30 + $VencidaEstadual60 + $VencidaEstadual180 ?></center></td>
        <td><center><?php echo $subtotalSemPendenciaEstadual = $SemPendenciasEstadual30 + $SemPendenciasEstadual60 + $SemPendenciasEstadual180 ?></center></td>
        <td><center><?php echo $subtotalComPendenciaEstadual = $ComPendenciasEstadual30 + $ComPendenciasEstadual60 + $ComPendenciasEstadual180 ?></center></td>
        <td><center><?php echo $Subtotal10DiasEstadual = $Com10diasEstadual30 + $Com10diasEstadual60 + $Com10diasEstadual180 ?></center></td>
        <td><center><?php echo $Subtotal20DiasEstadual = $Com20diasEstadual30 + $Com20diasEstadual60 + $Com20diasEstadual180?></center></td>
        <td><center><?php echo $Subtotal30DiasEstadual = $Com30diasEstadual30 + $Com30diasEstadual60 + $Com30diasEstadual180?></center></td>
        <td><center><?php echo $SubtotalMais30DiasEstadual = $ComMais30diasEstadual30 + $ComMais30diasEstadual60 + $ComMais30diasEstadual180?></center></td>
        
        <td><center><?php echo $porcentagemGeralSemPendenciaEstadual = $oCnd->porcentagem($porcentagemSemPendenciaEstadual30 + $porcentagemSemPendenciaEstadual60 + $porcentagemSemPendenciaEstadual180, $porcentagemSemPendenciaEstadual30 + $porcentagemSemPendenciaEstadual60 + $porcentagemSemPendenciaEstadual180 + $porcentagemComPendenciaEstadual30 + $porcentagemComPendenciaEstadual60 + $porcentagemComPendenciaEstadual180); ?></center></td>
        <td><center><?php echo $porcentagemGeralComPendenciaEstadual = $oCnd->porcentagem($porcentagemComPendenciaEstadual30 + $porcentagemComPendenciaEstadual60 + $porcentagemComPendenciaEstadual180, $porcentagemSemPendenciaEstadual30 + $porcentagemSemPendenciaEstadual60 + $porcentagemSemPendenciaEstadual180 + $porcentagemComPendenciaEstadual30 + $porcentagemComPendenciaEstadual60 + $porcentagemComPendenciaEstadual180); ?></center></td>
    
    
        </tr>  


        <tr>
            <td colspan="12">
                &nbsp;
            </td>
        </tr>

        <tr style="font-weight:bold;" >
            <td bgcolor="#f0f0f0" style="border-bottom: 0px"><center>CERTIDÃO MUNICIPAL</center></td>
        <td  bgcolor="#f0f0f0" style="border-bottom: 0px"><center>Total</center></td>
        <td bgcolor="#f0f0f0" style="border-bottom: 0px"><center>Em Dia</center></td>
        <td  bgcolor="#f0f0f0" style="border-bottom: 0px"><center>Vencidas</center></td>
        <td  bgcolor="#f0f0f0" style="border-bottom: 0px"><center>Sem Pendências</center></td>
        <td  bgcolor="#f0f0f0" style="border-bottom: 0px"><center>Com Pendências</center></td>
        <td  bgcolor="#f0f0f0" colspan="4" style="border-bottom: 0px"><center>Certidões à vencer em dias</center></td>
        <td  bgcolor="#f0f0f0" colspan="2"><center>Indicador de Desempenho</center></td>
        </tr>
        </thead>

        <tr  >
            <td bgcolor="#f0f0f0" style="font-weight:bold; border-left: 0px; border-top: 0px; "><b></b></td>
            <td bgcolor="#f0f0f0" style="font-weight:bold; border-left: 0px; border-top: 0px; "><center></center></td>
        <td bgcolor="#f0f0f0" style="font-weight:bold; border-left: 0px; border-top: 0px; "><center></center></td>
        <td bgcolor="#f0f0f0" style="font-weight:bold; border-left: 0px; border-top: 0px; "><center></center></td>
        <td bgcolor="#f0f0f0" style="font-weight:bold; border-left: 0px; border-top: 0px; "><center></center></td>
        <td bgcolor="#f0f0f0" style="font-weight:bold; border-left: 0px; border-top: 0px; "><center></center></td>
        <td bgcolor="#f0f0f0" style="width: 60px;" ><center><b>10</b></center></td>
        <td bgcolor="#f0f0f0" style="width: 60px;"><center><b>20</b></center></td>
        <td bgcolor="#f0f0f0" style="width: 60px;"><center><b>30</b></center></td>
        <td bgcolor="#f0f0f0" style="width: 60px;"><center><b>>30</b></center></td>
        <td bgcolor="#f0f0f0"><center><b>Sem Pendências</b></center></td>
        <td bgcolor="#f0f0f0"><center><b>Pendentes</b></center></td>
        </tr>  





        <tr>
            <td>Municipal - 30 dias</td>
            <td><center><?php echo $totalMunicipal30 = $oCnd->qtdTodosAmbitoDias(3,30)->total ?></center></td>
            <td><center><?php echo $DiaMunicipal30 = $oCnd->qtdTodosAmbitoDiasEmDia(3,30)->total ?></center></td>
            <td><center><?php echo $VencidaMunicipal30 = $oCnd->qtdTodosAmbitoDiasVencida(3,30)->total ?></center></td>
            <td><center><?php echo $SemPendenciasMunicipal30 = $oCnd->qtdTodosAmbitoSemPendencia(3,30)->total ?></center></td>
            <td><center><?php echo $ComPendenciasMunicipal30 = $oCnd->qtdTodosAmbitoComPendencia(3,30)->total ?></center></td>
        
            <td><center><?php echo $Com10diasMunicipal30 = $oCnd->qtdTodosVencerAmbitoDia(3,30,10)->total ?></center></td>
            <td><center><?php echo $Com20diasMunicipal30 = $oCnd->qtdTodosVencerAmbitoDia(3,30,20)->total ?></center></td>
            <td><center><?php echo $Com30diasMunicipal30 = $oCnd->qtdTodosVencerAmbitoDia(3,30,30)->total ?></center></td>
            <td><center><?php echo $ComMais30diasMunicipal30 = $oCnd->qtdTodosVencerAmbitoDia(3,30,'D')->total ?></center></td>
    
            
            <td><center><?php echo $porcentagemSemPendenciaMunicipal30 =  $oCnd->porcentagem($SemPendenciasMunicipal30, $SemPendenciasMunicipal30 + $ComPendenciasMunicipal30); ?></center></td>
            <td><center><?php echo $porcentagemComPendenciaMunicipal30 =  $oCnd->porcentagem($ComPendenciasMunicipal30, $SemPendenciasMunicipal30 + $ComPendenciasMunicipal30); ?></center></td>
    
    
    
        </tr> 


        <tr>
            <td>Municipal - 90 dias</td>
            <td><center><?php echo $totalMunicipal90 = $oCnd->qtdTodosAmbitoDias(3,90)->total ?></center></td>
            <td><center><?php echo $DiaMunicipal90 = $oCnd->qtdTodosAmbitoDiasEmDia(3,90)->total ?></center></td>
            <td><center><?php echo $VencidaMunicipal90 = $oCnd->qtdTodosAmbitoDiasVencida(3,90)->total ?></center></td>
            <td><center><?php echo $SemPendenciasMunicipal90 = $oCnd->qtdTodosAmbitoSemPendencia(3,90)->total ?></center></td>
            <td><center><?php echo $ComPendenciasMunicipal90 = $oCnd->qtdTodosAmbitoComPendencia(3,90)->total ?></center></td>
        
            <td><center><?php echo $Com10diasMunicipal90 = $oCnd->qtdTodosVencerAmbitoDia(3,90,10)->total ?></center></td>
            <td><center><?php echo $Com20diasMunicipal90 = $oCnd->qtdTodosVencerAmbitoDia(3,90,20)->total ?></center></td>
            <td><center><?php echo $Com30diasMunicipal90 = $oCnd->qtdTodosVencerAmbitoDia(3,90,30)->total ?></center></td>
            <td><center><?php echo $ComMais30diasMunicipal90 = $oCnd->qtdTodosVencerAmbitoDia(3,90,'D')->total ?></center></td>
    
        
            <td><center><?php echo $porcentagemSemPendenciaMunicipal90 =  $oCnd->porcentagem($SemPendenciasMunicipal90, $SemPendenciasMunicipal90 + $ComPendenciasMunicipal90); ?></center></td>
            <td><center><?php echo $porcentagemComPendenciaMunicipal90 =  $oCnd->porcentagem($ComPendenciasMunicipal90, $SemPendenciasMunicipal90 + $ComPendenciasMunicipal90); ?></center></td>
    
    
        </tr> 






        <tr>
            <td>Municipal - 180 dias</td>
            <td><center><?php echo $totalMunicipal180 = $oCnd->qtdTodosAmbitoDias(3,180)->total ?></center></td>
            <td><center><?php echo $DiaMunicipal180 = $oCnd->qtdTodosAmbitoDiasEmDia(3,180)->total ?></center></td>
            <td><center><?php echo $VencidaMunicipal180 = $oCnd->qtdTodosAmbitoDiasVencida(3,180)->total ?></center></td>
            <td><center><?php echo $SemPendenciasMunicipal180 = $oCnd->qtdTodosAmbitoSemPendencia(3,180)->total ?></center></td>
            <td><center><?php echo $ComPendenciasMunicipal180 = $oCnd->qtdTodosAmbitoComPendencia(3,180)->total ?></center></td>
    
        
            <td><center><?php echo $Com10diasMunicipal180 = $oCnd->qtdTodosVencerAmbitoDia(3,180,10)->total ?></center></td>
            <td><center><?php echo $Com20diasMunicipal180 = $oCnd->qtdTodosVencerAmbitoDia(3,180,20)->total ?></center></td>
            <td><center><?php echo $Com30diasMunicipal180 = $oCnd->qtdTodosVencerAmbitoDia(3,180,30)->total ?></center></td>
            <td><center><?php echo $ComMais30diasMunicipal180 = $oCnd->qtdTodosVencerAmbitoDia(3,180,'D')->total ?></center></td>
    
            <td><center><?php echo $porcentagemSemPendenciaMunicipal80 =  $oCnd->porcentagem($SemPendenciasMunicipal180, $SemPendenciasMunicipal180 + $ComPendenciasMunicipal180); ?></center></td>
            <td><center><?php echo $porcentagemComPendenciaMunicipal80 =  $oCnd->porcentagem($ComPendenciasMunicipal180, $SemPendenciasMunicipal180 + $ComPendenciasMunicipal180); ?></center></td>
    
    
        </tr> 


        <tr style="font-weight:bold;" >
            <td align=center>SUB-TOTAL MUNICIPAL</td>
            <td><center><?php echo $subtotalMunicipalGeral = $totalMunicipal30 + $totalMunicipal90 + $totalMunicipal180 ?></center></td>
            <td><center><?php echo $subtotalMunicipalEmDia = $DiaMunicipal30 + $DiaMunicipal90 + $DiaMunicipal180 ?></center></td>
            <td><center><?php echo $subtotalMunicipalVencida = $VencidaMunicipal30 + $VencidaMunicipal90 + $VencidaMunicipal180 ?></center></td>
            <td><center><?php echo $subtotalSemPendenciaMunicipal = $SemPendenciasMunicipal30 + $SemPendenciasMunicipal90 + $SemPendenciasMunicipal180 ?></center></td>
            <td><center><?php echo $subtotalComPendenciaMunicipal = $ComPendenciasMunicipal30 + $ComPendenciasMunicipal90 + $ComPendenciasMunicipal180 ?></center></td>
            <td><center><?php echo $Subtotal10DiasMunicipal = $Com10diasMunicipal30 + $Com10diasMunicipal90 + $Com10diasMunicipal180 ?></center></td>
            <td><center><?php echo $Subtotal20DiasMunicipal = $Com20diasMunicipal30 + $Com20diasMunicipal90 + $Com20diasMunicipal180 ?></center></td>
            <td><center><?php echo $Subtotal30DiasMunicipal = $Com30diasMunicipal30 + $Com30diasMunicipal90 + $Com30diasMunicipal180 ?></center></td>
            <td><center><?php echo $SubtotalMais30DiasMunicipal = $ComMais30diasMunicipal30 + $ComMais30diasMunicipal90 + $ComMais30diasMunicipal180 ?></center></td>
        
            <td><center><?php echo $porcentagemGeralSemPendenciaMunicipal = $oCnd->porcentagem($porcentagemSemPendenciaMunicipal30 + $porcentagemSemPendenciaMunicipal90 + $porcentagemSemPendenciaMunicipal80, $porcentagemSemPendenciaMunicipal30 + $porcentagemSemPendenciaMunicipal90 + $porcentagemSemPendenciaMunicipal80 + $porcentagemComPendenciaMunicipal30 + $porcentagemComPendenciaMunicipal90 + $porcentagemComPendenciaMunicipal80); ?></center></td>
            <td><center><?php echo $porcentagemGeralComPendenciaMunicipal = $oCnd->porcentagem($porcentagemComPendenciaMunicipal30 + $porcentagemComPendenciaMunicipal90 + $porcentagemComPendenciaMunicipal80, $porcentagemSemPendenciaMunicipal30 + $porcentagemSemPendenciaMunicipal90 + $porcentagemSemPendenciaMunicipal80 + $porcentagemComPendenciaMunicipal30 + $porcentagemComPendenciaMunicipal90 + $porcentagemComPendenciaMunicipal80); ?></center></td>
    
    
    
        </tr>  


        <tr>
            <td colspan="11">
                &nbsp;
            </td>
        </tr>


        <tr style="font-weight:bold;" >
            <td align=center>TOTAL GERAL</td>
            <td><center><?php echo $subtotalFederalGeral + $subtotalEstadualGeral + $subtotalMunicipalGeral  ?></center></td>
            <td><center><?php echo $subtotalEmDiaFederal + $subtotalEstadualEmDia + $subtotalMunicipalEmDia  ?></center></td>
            <td><center><?php echo $subtotalVencidaFederal + $subtotalEstadualVencida + $subtotalMunicipalVencida  ?></center></td>
            <td><center><?php echo $totalSemPendencia + $subtotalSemPendenciaEstadual + $subtotalSemPendenciaMunicipal  ?></center></td>
            <td><center><?php echo $totalComPendencia + $subtotalComPendenciaEstadual + $subtotalComPendenciaMunicipal  ?></center></td>
            <td><center><?php echo $Subtotal10DiasFederal + $Subtotal10DiasEstadual + $Subtotal10DiasMunicipal ?></center></td>
            <td><center><?php echo $Subtotal20DiasFederal + $Subtotal20DiasEstadual + $Subtotal20DiasMunicipal ?></center></td>
            <td><center><?php echo $Subtotal30DiasFederal + $Subtotal30DiasEstadual + $Subtotal30DiasMunicipal ?></center></td>
            <td><center><?php echo $SubtotalMais30DiasFederal + $SubtotalMais30DiasEstadual + $SubtotalMais30DiasMunicipal ?></center></td>
        
            <td><center><?php echo $oCnd->porcentagem($PorcentagemTotalSemPendenciaFederal + $porcentagemGeralSemPendenciaEstadual + $porcentagemGeralSemPendenciaMunicipal,$PorcentagemTotalSemPendenciaFederal + $porcentagemGeralSemPendenciaEstadual + $porcentagemGeralSemPendenciaMunicipal + $PorcentagemTotalCemPendenciaFederal + $porcentagemGeralComPendenciaEstadual + $porcentagemGeralComPendenciaMunicipal); ?></center></td>
            <td><center><?php echo $oCnd->porcentagem($PorcentagemTotalCemPendenciaFederal + $porcentagemGeralComPendenciaEstadual + $porcentagemGeralComPendenciaMunicipal,$PorcentagemTotalSemPendenciaFederal + $porcentagemGeralSemPendenciaEstadual + $porcentagemGeralSemPendenciaMunicipal + $PorcentagemTotalCemPendenciaFederal + $porcentagemGeralComPendenciaEstadual + $porcentagemGeralComPendenciaMunicipal); ?></center></td>
    
    
        </tr>  



    </table>


</div>